package tgc.edu.examxy.entity;

import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

import org.springframework.data.annotation.CreatedBy;

import com.fasterxml.jackson.annotation.JsonIgnore;

import tgc.edu.examxy.custom.BaseEntity;

/***
 * 教师评价信息
 * 
 * @author Administrator
 *
 */
@Entity
public class Teacherevaluation extends BaseEntity<UUID> {

	private TbCurriculum curriculum;
	private Teacher teacher;
	private String tgrade;// 评价等级
	private String details;// 评价内容
	private String proposal;// 建议
	@JsonIgnore
	private List<Student> students = new ArrayList<>();

	@ManyToOne
	@CreatedBy
	public TbCurriculum getCurriculum() {
		return curriculum;
	}

	public void setCurriculum(TbCurriculum curriculum) {
		this.curriculum = curriculum;
	}

	@ManyToOne
	@CreatedBy
	public Teacher getTeacher() {
		return teacher;
	}

	public void setTeacher(Teacher teacher) {
		this.teacher = teacher;
	}

	public String getTgrade() {
		return tgrade;
	}

	public void setTgrade(String tgrade) {
		this.tgrade = tgrade;
	}

	public String getDetails() {
		return details;
	}

	public void setDetails(String details) {
		this.details = details;
	}

	public String getProposal() {
		return proposal;
	}

	public void setProposal(String proposal) {
		this.proposal = proposal;
	}

	@OneToMany(cascade=CascadeType.ALL,mappedBy="teacherevaluation")
	public List<Student> getStudents() {
		return students;
	}

	public void setStudents(List<Student> students) {
		this.students = students;
	}

}
